Skip to content

feat(prepareMigration): add post-pre-migration role-swap script#271

Merged
hiddentao merged 6 commits intomainfrom
feature/bet-593-prepare-migration-script-to-be-run-after-all-pre-migrations
Apr 23, 2026
Merged

feat(prepareMigration): add post-pre-migration role-swap script#271
hiddentao merged 6 commits intomainfrom
feature/bet-593-prepare-migration-script-to-be-run-after-all-pre-migrations

Conversation

@hiddentao
Copy link
Copy Markdown
Collaborator

Introduces prepareMigration.ts to revoke BatchRegistrar's seeding roles on the .eth PermissionedRegistry and grant registration roles to ETHRegistrar and the Unlocked/Locked migration controllers. Extracts shared viem client/artifact helpers into scriptUtils.ts and refactors preMigration.ts to consume them. Adds e2e coverage plus a test helper that reverts the devnet into a true pre-prepareMigration state.

Introduces `prepareMigration.ts` to revoke BatchRegistrar's seeding roles
on the .eth PermissionedRegistry and grant registration roles to
ETHRegistrar and the Unlocked/Locked migration controllers. Extracts
shared viem client/artifact helpers into `scriptUtils.ts` and refactors
`preMigration.ts` to consume them. Adds e2e coverage plus a test helper
that reverts the devnet into a true pre-prepareMigration state.
Add contracts/docs/prepareMigration.md covering the script's role changes,
prerequisites, CLI flags, workflow, and dry-run/execute examples. Link both
the pre-migration and prepare-migration docs from the contracts README
Migration Controllers section.
…HRegistrar

Fully decommissions BatchRegistrar by also revoking ROLE_RENEW and
ROLE_RENEW_ADMIN, and grants ROLE_RENEW to ETHRegistrar so renewals
flow through the live registrar after hand-off. Updates docs and e2e
tests to reflect the new post-state where BatchRegistrar holds no roles.
@hiddentao hiddentao marked this pull request as ready for review April 20, 2026 09:18
@immunefi-magnus
Copy link
Copy Markdown

🛡️ Immunefi PR Reviews

We noticed that your project isn't set up for automatic code reviews. If you'd like this PR reviewed by the Immunefi team, you can request it manually using the link below:

🔗 Send this PR in for review

Once submitted, we'll take care of assigning a reviewer and follow up here.

@hiddentao hiddentao requested a review from Arachnid April 20, 2026 09:18
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44bcb025e9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread contracts/test/e2e/prepareMigration.test.ts Outdated
Comment thread contracts/docs/prepareMigration.md Outdated
…onstants

Replace locally-defined ROLE_* bigint literals with ROLES and DEPLOYMENT_ROLES
from deploy-constants. Add ETH_REGISTRAR_ROOT to DEPLOYMENT_ROLES and use it
in 03_ETHRegistrar and 04_BatchRegistrar deploy scripts. Document
ROLE_RENEW_ADMIN in the signer prerequisites.
@hiddentao hiddentao requested a review from adraffy April 22, 2026 08:06
@hiddentao hiddentao merged commit 544daa8 into main Apr 23, 2026
6 checks passed
@hiddentao hiddentao deleted the feature/bet-593-prepare-migration-script-to-be-run-after-all-pre-migrations branch April 23, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants